<div class="col-lg-12 col-sm-12 col-xs-12">
  <div class="row">
    <div class="widget">
      <div class="widget-header bordered-bottom">
        <span class="widget-caption">用户</span>
      </div>
      <div class="widget-body">
        <div>
          <input type="hidden" name="_csrf" value="<%= _csrf %>" />
          <div class="form-group">
            <label for="header">头像</label>
            <input name="header" type="text" class="form-control" id="header" placeholder="" value="<%= user.header||'' %>">
          </div>
          <div class="form-group">
            <label for="account">帐号</label>
            <span class="input-icon">
              <input name="account" type="text" class="form-control" id="account" placeholder="请输入帐号" value="<%= user.account||'' %>">
              <li class="glyphicon glyphicon-credit-card circular"></li>
            </span>
          </div>
          <div class="form-group">
            <label for="Name">用户名</label>
            <span class="input-icon">
              <input name="Name"  type="text" class="form-control" id="Name" placeholder="请输入用户名" value="<%= user.Name||'' %>">
              <li class="glyphicon glyphicon-user circular"></li>
            </span>
          </div>
          <div class="form-group">
            <label for="mail">邮箱</label>
            <span class="input-icon">
              <input name="mail"  type="text" class="form-control mail" id="mail" placeholder="请输入邮箱" value="<%= user.mail||'' %>">
              <i class="fa fa-envelope-o circular"></i>
            </span>
          </div>
          <div class="form-group">
            <label for="depart">部门</label>
            <input name="depart" type="text" class="form-control" id="depart" placeholder="请输入部门" value="<%= user.depart||{}.name||'' %>">
          </div>
          <div class="form-group">
            <label for="actor">角色</label>
            <div class="input-group" style="width:100%;">
              <select id="selRoles" name="role" style="width:100%;" >
                  <option value="0" />无
                  <% roles.forEach(function(r){%>
                    <option value="<%=r.id%>" /><%=r.Name%>
                    <%}) %>
              </select>
            </div>
          </div>
          <button type="submit" class="btn btn-blue">提交</button>
          <a href="/user" class="btn">返回</a>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" style="display: none;">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">

            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="myLargeModalLabel">Large modal</h4>
            </div>
            <div class="modal-body">
                ...
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
<script type="text/javascript">
    $("#selRoles").select2({
            placeholder: "选择角色",
            allowClear: true
        });
    $("#selRoles").val("<%= user.role %>").trigger("change");
</script>
